package com.guodi.model.enums;

import lombok.Getter;

import java.util.Objects;

/**
 * @描述: 整改跟踪问题状态
 * @作者: lzy
 * @日期: 2023/8/22 15:39
 **/
@Getter
public enum UeProblemStatusEnum {

    ADD("1" , "新增"  ),
    IMPROVE("2" , "改善" ),
    DETERIORATE("3" ,"恶化" ),
    UNCHANGED("4" , "不变" ),
    SOLVE("0" , "解决" );

    //编码
    private String code;

    //状态
    private String status;

    UeProblemStatusEnum(String code, String status){
        this.code = code;
        this.status = status;
    }

    /**
     * @描述: 获取状态
     * @入参:
     * @出参:
     * @作者: lzy
     * @日期: 2023/8/22 15:39
     **/
    public static String getStatusByCode(String code) {
        UeProblemStatusEnum[] values = values();
        for (UeProblemStatusEnum value : values) {
            if(Objects.equals(value.getCode(), code)){
                return value.getStatus();
            }
        }
        return "";
    }

}
